using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Reap.AzureResource.Model.Models.Mapping;

namespace Reap.AzureResource.Model.Models
{
    public partial class AzureResourceContext : DbContext
    {
        static AzureResourceContext()
        {
            Database.SetInitializer<AzureResourceContext>(null);
        }

        public AzureResourceContext()
            : base("Name=AzureResourceContext")
        {
        }

        public DbSet<Location> Locations { get; set; }
        public DbSet<Resource> Resources { get; set; }
        public DbSet<ResourceActivity> ResourceActivities { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new LocationMap());
            modelBuilder.Configurations.Add(new ResourceMap());
            modelBuilder.Configurations.Add(new ResourceActivityMap());
        }
    }
}
